package com.start.admin.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.start.admin.entity.StartSysMenu;
import com.start.admin.entity.StartSysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysRoleMapper extends BaseMapper<StartSysRole> {


    @Select("SELECT sm.*  " +
            " FROM start_sys_role_menu srm  " +
            " INNER JOIN start_sys_menu sm ON sm.id = srm.menu_id  " +
            " AND srm.role_id = #{roleId}")
    List<StartSysMenu> listRoleMenuByRoleId(@Param("roleId") String roleId);


}
